<template>
    <div class="child1">
        这是ciild1
         <h1>这是child1---{{child1Value}}</h1>
         <el-button @click="addCount1">增加</el-button>
    </div>
</template>

<script>
export default {
    props:{
        child1Value:{
            type:Number,
            defaule:0
        }
    },
    data(){
        return{

        }
    },
    methods:{
        addCount1(){
            this.$emit('addCount',this.child1Value++)
        }
    }
}
</script>

<style scoped lang="scss">
.child1{
    width: 300px;
    height: 200px;
    border: 2px solid red;
}
</style>